/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package interfaz;

import javax.swing.JFrame;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.data.category.DefaultCategoryDataset;

/**
 *
 * @author kaaf
 */
public class GraficosEstadisticos {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        DefaultCategoryDataset dataSet=new DefaultCategoryDataset();
        
        dataSet.setValue(20, "Grafico1", "Lunes");
        dataSet.setValue(30, "Grafico1", "Martes");
        dataSet.setValue(30, "Grafico1", "Miercoles");
        dataSet.setValue(45, "Grafico1", "Jueves");
        dataSet.setValue(20, "Grafico1", "Viernes");
        
        dataSet.setValue(40, "Grafico2", "Lunes");
        dataSet.setValue(10, "Grafico2", "Martes");
        dataSet.setValue(23, "Grafico2", "Miercoles");
        dataSet.setValue(35, "Grafico2", "Jueves");
        dataSet.setValue(45, "Grafico2", "Viernes");
        
        dataSet.setValue(40, "Grafico3", "Lunes");
        dataSet.setValue(30, "Grafico3", "Martes");
        dataSet.setValue(20, "Grafico3", "Miercoles");
        dataSet.setValue(30, "Grafico3", "Jueves");
        dataSet.setValue(45, "Grafico3", "Viernes");
        
//        JFreeChart chart = ChartFactory.createBarChart3D("Gráfico", "Eje X",
//        "Eje Y", dataSet, PlotOrientation.VERTICAL, true,
//        true, false);

        JFreeChart chart = ChartFactory.createBarChart("Visitas", "día",
        "Número visitas", dataSet, PlotOrientation.VERTICAL, true,
        true, false);

//        JFreeChart chart = ChartFactory.createAreaChart("Visitas", "día",
//        "Número visitas", dataSet, PlotOrientation.VERTICAL, true,
//        true, false);

//        JFreeChart chart = ChartFactory.createWaterfallChart("Visitas", "día",
//        "Número visitas", dataSet, PlotOrientation.VERTICAL, true,
//        true, false);

//        JFreeChart chart = ChartFactory.createLineChart("Ventas Diarias", "día",
//        "Cantidad", dataSet, PlotOrientation.VERTICAL, true,
//        true, false);

//        JFreeChart chart = ChartFactory.createLineChart3D("Visitas", "día",
//        "Número visitas", dataSet, PlotOrientation.VERTICAL, true,
//        true, false);
//        
        
        ChartPanel panel=new ChartPanel(chart);
        
        JFrame ventana=new JFrame("Mi Grafico");
        ventana.getContentPane().add(panel);
        ventana.pack();
        ventana.setVisible(true);
        ventana.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
}
